import java.util.EventObject;
import java.util.List;


/**
 * A {@link LolBotEvent} will hold the nick of the person
 * that wrote the command, and also the list of arguments
 * for that command.
 * @author Tobias Johansson
 *
 */
public class LolBotEvent extends EventObject {
	String sourceNick;
	List<String> arguments;
	String badWord;
	
	/**
	 * Creates a new {@link LolBotEvent} to send to the listeners.
	 * @param source A reference to the object that created this event.
	 * @param sourceNick The nick of the person that wrote the command.
	 * @param arguments The arguments, if any, for the command.
	 * @param badWord If a bad word has been written in the chat, 
	 * we send it too.
	 */
	public LolBotEvent(Object source, String sourceNick, 
			List<String> arguments, String badWord) {
		super(source);
		
		this.sourceNick = sourceNick;
		this.arguments = arguments;
		this.badWord = badWord;
	}

	/**
	 * Get the nick of the person that wrote the command.
	 * @return The nick of the person that wrote the command.
	 */
	public String getSourceNick(){
		return sourceNick;
	}
	
	/**
	 * Get the arguments for the command, if any.
	 * @return The arguments for the command, if any.
	 */
	public List<String> getArguments(){
		return arguments;
	}
	
	public String getBadWord(){
		return badWord;
	}
}
